home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / The Director Toolkit v1.0.adf / BlitUtil / docs < prev    next >
Text File  |  1987-02-25  |  19KB  |  433 lines

  1.  
  2. |f2|c7|t1The Enhanced Blit Utility|f1|c3|t0
  3.  
  4. The Enhanced Blit Utility (|c7|-EBU|c3|-) is a tool to help you 
  5. generate Director
  6. commands, and in some instances, complete scripts.  Like the original
  7. Blit Utility provided on the Director disk, it can be used to automatically
  8. generate coordinate values for |c7BLIT|c3 commands.  In addition, 
  9. |c7EBU|c3 has a 
  10. vastly improved user interface utilizing another tool provided on the 
  11. Director ToolKit disk, the file requester.|r1
  12.  
  13. |c7EBU|c3 futher improves over the original Blit Utility's capabilities 
  14. by also generating |c7DISSOLVE|c3 and |c7WIPE|c3 commands.  |c7EBU|c3 also 
  15. allows
  16. you to specify a command or two to be added to multiple |c7BLIT|c3 commands,
  17. a feature indispensable when you are doing several |c7BLIT|c3 commands and
  18. would like to do, say, a |c7PAUSE|c3 after each one.
  19. |e
  20.  
  21. Beyond these basic command generation capatilities, |c7EBU|c3 allows you to
  22. configure movement of an object over a background, generating a complete
  23. working script.  Further, you can create an animated object, or 
  24. |c7character|c3 to be moved.|r1
  25.  
  26. It may be important to note that the |c7EBU|c3 utilities are of limited 
  27. usefulness with |c7HAM|c3 images.  While all of the functions will 
  28. work, |c7HAM|c3 
  29. screens tend to exhibit visible side effects due to the way the |c74096|c3 
  30. color capability is provided in the hardware.  |c7HAM|c3 paint programs that 
  31. you may be familiar with resolve such problems via a time-consuming 
  32. computation that resolves the edges of a |c7"brush"|c3 with the background 
  33. at the time it is placed.  
  34. |e
  35.  
  36. Unfortunately, this edge resolving operation is slow and cannot take place 
  37. at animation speeds, so the Director does not attempt to perform such 
  38. an operation.  This will likely result in visible |c7HAM|c3 "fringing" 
  39. effects when you use the |c7EBU|c3 on |c7HAM|c3 images.  Certain 
  40. operations can be performed
  41. successfully however, though it depends greatly on the effect desired
  42. and your familiarity with the characteristics of |c7HAM|c3 images.  While a 
  43. |c7HAM|c3 characteristics tutorial is beyond the scope of the
  44. Director ToolKit,
  45. it never hurts to experiment.  You may wish to cut your teeth on 
  46. the |c7EBU|c3 with non-|c7HAM|c3 images first however, so you can 
  47. see how it works without potentially distracting |c7HAM|c3 side effects.
  48. |e
  49.  
  50.  
  51. In addition, you may have to be a little careful when using |c7Hi-Res|c3
  52. screens.
  53. The object move script generated requires 4 |c7CHIP|c3 buffers, and 
  54. you will be 
  55. unable to load |c74 Hi-Res 16 color|c3 buffers into 
  56. |c7512K|c3 of |c7CHIP RAM|c3|-.  You can
  57. drop down to fewer colors, but tread with caution, as |c7EBU|c3 itself, 
  58. written 
  59. in the Director, will abort if an out-of-memory error occurs.
  60. |e
  61.  
  62. Let's explore |c7EBU|c3|-'s main screen.  Below the title area are three 
  63. long buttons, labeled:|r1
  64.  
  65. |c7|+8|t1|f2Generate BLIT/WIPE/DISSOLVE
  66. |+8Generate A Moving Object
  67. |+8Build A Character|t0|c3|f1
  68.  
  69. These buttons select the three main |c7EBU|c3 functions.|r1
  70.  
  71. Below the selection buttons, there is a text |c7"gadget"|c3 labeled 
  72. |c7"Background File"|c3|-.  At any time, you can click on this gadget and
  73. a file requester will appear allowing you to select an |c7IFF|c3 image
  74. file to be used as a background image for your movement or |c7BLIT|c3
  75. command.
  76. |e
  77.  
  78. In the upper right corner of the gadget, is a box that displays the
  79. buffer number to be used by the background image.  You can click in
  80. this box to change the buffer number if desired.  If you are starting
  81. a new Director script, you can probably just leave this alone as it
  82. will already contain a default value which should work fine for a new
  83. script.|r1  
  84.  
  85. If you are going to be incorporating the |c7EBU|c3|-'s output 
  86. commands into an 
  87. existing script, you may wish to select buffer numbers that will not 
  88. conflict with any you may wish to keep, or in the case of |c7BLIT|c3 command
  89. generation, the actual buffer numbers the |c7IFF|c3 images will be 
  90. loaded into by your existing script.
  91. |e
  92.  
  93. |c7EBU|c3 object move scripts use 
  94. buffers |c728|c3 and |c729|c3 to double buffer.  This is
  95. easy to change by modifying these two values at the beginning of the 
  96. script that is produced if there is a conflict with buffers you may already
  97. be using.
  98. |e
  99.  
  100. Below the |c7"Background File"|c3 gadget, is a similar gadget labeled
  101. |c7"Object File"|c3|-.  Like the |c7Background File|c3 gadget, you can click 
  102. on this at any time to select an object file to be used.   Also like 
  103. the |c7Background File|c3 gadget, there is a box in the upper right corner 
  104. that displays the buffer number to be used by the object image.|r1
  105.  
  106. Below the |c7"Object File"|c3 gadget, is the |c7"Output File"|c3 gadget.  
  107. This gadget contains the file name of the script file to be 
  108. output by |c7EBU|c3|-.
  109. The default file name for the output file is |c7"ram:ebuout"|c3|-.  You 
  110. can click on this gadget to change the output file name.  
  111. |e
  112.  
  113. Connected to the lower part of the |c7"Object File"|c3 gadget are two 
  114. buttons labeled |c7APPEND|c3 and |c7CLEAR|c3|-.|r1  
  115.  
  116. Clicking on the |c7CLEAR|c3 button will erase any previous script file 
  117. information in the file by the name appearing in the |c7Object File|c3 
  118. gadget.  You can use this button to clear out the output file in the
  119. event you make a mistake and want to start completely over, or if
  120. you change your mind about what you wanted to do.  When you click on
  121. the |c7CLEAR|c3 button, an |c7"Are you sure?"|c3 message will 
  122. appear and you are
  123. then required to click on the |c7YES|c3 or |c7NO|c3 button, to make 
  124. sure you
  125. really want to delete all the information contained in the Output File.
  126. |e
  127.  
  128. Clicking on the |c7APPEND|c3 button will cause an |c7asterisk|c3 to be 
  129. displayed
  130. next to the |c7APPEND|c3 button, indicating you are in the append mode.  In
  131. this mode, |c7EBU|c3 output commands will be added to the end of any existing
  132. output file, instead of a new file started from scratch as is the case
  133. when you are not in the append mode.  This can be useful if you want
  134. to add more |c7BLIT|c3 commands to the end of a file you had created in an
  135. earlier session with |c7EBU|c3|-.  Be careful though; when used with object
  136. move generation, it can produce confused scripts that will not run
  137. directly.
  138. |e
  139.  
  140. In the lower left corner of the |c7EBU|c3 screen, the number of 
  141. |c7BLIT|c3|-'s and MOVEs
  142. generated are counted and displayed.|r1
  143.  
  144. In the lower right corner of the |c7EBU|c3 screen, is the |c7DONE|c3 
  145. button.  Click on
  146. this button when you have finished using |c7EBU|c3|-.
  147. |e
  148.  
  149. Now let's explore the main selection buttons.|r1
  150.  
  151. You will notice that when you click on any of the three main selection
  152. buttons, the menu button area will change, displaying new buttons for
  153. use within the chosen selection.  From these new button |c7"menus"|c3|-,
  154. you can always return to the main button screen by clicking on the button
  155. in the upper left labeled |c7MAIN MENU|c3|-.
  156. |e
  157.  
  158. The top three buttons in all of the main selections are all the same,
  159. these are:|r1
  160.  
  161. |+6|c7MAIN MENU|+5PICK OBJECT|+4TRANSPARENT|c3|r1
  162.  
  163. We've described |c7MAIN MENU|c3 above.  |c7PICK OBJECT|c3 is used to select a
  164. rectangular area that outlines your object to be used.  |c7TRANSPARENT|c3
  165. will toggle transparent mode on and off.  
  166. |e
  167.  
  168. When in |c7PICK OBJECT|c3|-, if an object file has not been 
  169. selected, |c7EBU|c3
  170. will pop up the file requester so one can then be selected.  Once
  171. an object file is available, |c7EBU|c3 will then display the file, allowing
  172. you to place a box defining the rectangular area that encompasses your
  173. selected object.  Note that you do not |c7click-and-drag|c3 the mouse to 
  174. place your box, you should use |c7two specific clicks|c3|-, one for the upper
  175. left and one for the lower right corner of the box.  Once the box appears,
  176. you can readjust either corner of the box by clicking near the corner to
  177. be adjusted.  The box will be redrawn to reflect the new clicked upon
  178. location.
  179. |e
  180.  
  181. When in |c7TRANSPARENT|c3 mode, the buttons lettering will become pink.  
  182. In |c7TRANSPARENT|c3 mode, any pixels that are color |c70|c3 in the 
  183. rectangular 
  184. object area, are treated as |c7"transparent"|c3|-, that is, they are not 
  185. transferred with the image.  When doing a move, the Director's 
  186. |c7TRANSPARENT|c3 command is added to the script automatically. 
  187. When using 
  188. the |c7Generate BLIT/DISSOLVE/WIPE|c3 capabilities which do |c7not|c3
  189. generate a complete script, it is assumed that the
  190. |c7TRANSPARENT|c3 command will be added appropriately to your script by you.
  191. See the Director's manual for more details on the |c7TRANSPARENT|c3 command.
  192. |e
  193.  
  194. |c7|f2Generate BLIT/WIPE/DISSOLVE|f1|c3|r1
  195.  
  196. If an object has not yet been |c7"picked"|c3|-, the lower three buttons in 
  197. this mode will be blank.  This indicates that these selections are not
  198. available until an object has been picked.  After you have used 
  199. |c7PICK OBJECT|c3 to select an object, the button labels 
  200. |c7DISSOLVE|c3|-, |c7BLIT|c3|-, and |c7WIPE|c3 appear.|r1  
  201.  
  202. Below these buttons, the word |c7Postfix:|c3 is displayed.  If you wish to 
  203. have |c7EBU|c3 automatically add a command or two to the end of 
  204. your |c7BLIT|c3|-, |c7DISSOLVE|c3 or |c7WIPE|c3 commands, you can 
  205. click on this area and type the command(s) in.
  206. |e
  207.  
  208. For example, if you type |c7"pause p"|c3 in the |c7Postfix:|c3 area, all 
  209. commands you generate will look something like this:|r1
  210.  
  211. |+8|c7BLIT 3,23,75,88,90,12,22:pause p|c3|r1
  212.  
  213. If you then plan to generate several related |c7BLIT|c3 commands, all with 
  214. pauses, you can then set the variable |c7p|c3 to adjust the delay 
  215. time between |c7BLIT|c3|-s.  Or you could use |c7GOSUB 100|c3 to add 
  216. a gosub to a double buffering
  217. routine or other routine you wish to run after every |c7BLIT|c3|-.
  218. |e
  219.  
  220.  
  221.  
  222. You can add multiple commands by typing in the |c7Postfix:|c3 area 
  223. something like:
  224.  
  225. |+8|c7pause p:frame=frame+1|c3|r1
  226. |e
  227.  
  228. When you are ready to generate a |c7DISSOLVE|c3|-, |c7BLIT|c3|-, or 
  229. |c7WIPE|c3 command, just
  230. click on the designated button.  |c7EBU|c3 will then display the background
  231. file image and wait for you to click the mouse to place the object
  232. in position.  You can re-click to adjust the position further, or
  233. use the arrow keys to move the object around |c71|c3 pixel at a time.
  234. The object will flash indicating it's registration over the background
  235. and allowing for exact positioning.|r1 
  236. |e
  237.  
  238. Once the object is positioned as you like it, you have two options,
  239. |c71)|c3 hit the |c7return key|c3 to keep the position, or |c72)|c3 hit the 
  240. |c7space bar|c3
  241. to keep the position but immediately place the same object in another
  242. position.  Option |c72|c3 allows for quick placement of the same object in
  243. several positions.  Either way, when you are finished placing the
  244. object, the return key will return you to the |c7EBU|c3 screen for your
  245. next operation.  The |c7DONE|c3 button will then exit |c7EBU|c3 and 
  246. allow you to enter your editor for inclusion of the output file.
  247. |e
  248.  
  249. In |c7ED|c3|-, to add the output file to the middle of an existing script,
  250. use |c7ED|c3 on the existing script, position the cursor to where you
  251. want to insert the generated commands.  Then hit the |c7ESC|c3 key.  
  252. |c7ED|c3 will display an |c7asterisk|c3 at the bottom of the 
  253. screen for further command information.  Type:|r1
  254.  
  255. |+8|c7*if/ram:ebuout/|c3|r1
  256.  
  257. and hit return.  The |c7if|c3 (Insert File) command will read the file
  258. specified between the slashes and insert it at the current cursor
  259. location.
  260. |e
  261.  
  262. |c7|f2Generate A Moving Object|c3|f1|r1
  263.  
  264. The |c7LOAD CHAR|c3 button on this screen is used to load a 
  265. character previously
  266. saved with the |c7SAVE CHAR|c3 selection in the |c7"Build A Character"|c3
  267. section 
  268. described later.  When you click on this button, a file requester will
  269. appear allowing you to select the character file previously saved.
  270. |e
  271.  
  272. The |c7MOVE|c3 button will take you to the background screen, where you 
  273. will use the mouse to place your object in first the starting, and then the
  274. ending location of the move.  Like using the |c7"Generate BLIT"|c3 section, 
  275. you click to place in the approximate position, use the |c7arrow keys|c3
  276. for fine
  277. tuning, and hit the |c7return key|c3 when the object is correctly positioned.
  278. In the case of |c7MOVE|c3|-, you will do this twice before |c7EDU|c3 will 
  279. return you to
  280. the |c7EDU|c3 main screen.  If you want to move the object again, select 
  281. |c7MOVE|c3 again, and you will find that the ending position of the previous 
  282. |c7MOVE|c3 is saved on the screen.  This will allow you to position the 
  283. starting
  284. point of the next move to be in the same location so that your second
  285. move can be a continuation of the first.
  286. |e
  287.  
  288. If you want to position an object off screen for either the starting and/or
  289. the ending locations of a move, you can use the |c7arrow keys|c3 to shove 
  290. the object off screen.  If you hit the |c7SHIFT|c3 key along with the 
  291. |c7arrow keys|c3|-,
  292. the |c7arrow keys|c3 will move the object |c710|c3 pixels instead of 
  293. |c71|c3 for quicker moving of objects off screen.|r1
  294.  
  295. Remember to hit |c7TRANSPARENT|c3 if you don't want the a rectangular 
  296. background area transferred along with the object.
  297. |e
  298.  
  299. The |c7CONTINUOUS|c3 button will toggle pink like the |c7TRANSPARENT|c3
  300. button, and
  301. when in |c7CONTINUOUS|c3 mode (pink) the object will not remain on the 
  302. screen
  303. in it's final |c7MOVE|c3 location, but will continue on via the next 
  304. |c7MOVE|c3|-.
  305. In fact, the final location of any given move is not actually reached
  306. when in |c7CONTINUOUS|c3|-, as it is expected that the first position of the 
  307. next move will be equivalent and the final position of the previous 
  308. move redundant.|r1
  309.  
  310. If you want the last move of a series of continuation moves to stop
  311. on the actual final position of the last move, be sure to switch off
  312. |c7CONTINUOUS|c3 before specifying the final move.
  313. |e
  314.  
  315.  
  316.  
  317. Hit |c7DONE|c3 when you have specified all your |c7MOVE|c3|-s.  At this 
  318. point, a
  319. complete commented Director script has been generated into the Output File.
  320. |e
  321.  
  322.  
  323. |f2|c7Build A Character|f1|c3|r1
  324.  
  325. The idea behind building a character is to cut a series of objects out
  326. of one or more |c7IFF|c3 files and register them in place on top 
  327. of each other.
  328. For example, a running man can be built so he runs in place, and when
  329. moved in the |c7MOVE|c3 section, he will then run correctly across 
  330. the screen.
  331. |e
  332.  
  333. After you |c7PICK OBJECT|c3 in this section, the middle button, 
  334. |c7ADD OBJECT|c3
  335. will appear.  When you select |c7ADD OBJECT|c3|-, a clear screen will appear
  336. where you can place the first object for your character by clicking
  337. the mouse.  Place the first object anywhere on the screen that is
  338. convenient.  Hit the |c7return key|c3 to exit the |c7ADD OBJECT|c3
  339. screen.  Do another 
  340. |c7PICK OBJECT|c3 and get the next image of your character.  Another 
  341. |c7ADD OBJECT|c3 and you can place the new image on top of the previous 
  342. character so that it is correctly registered for his animation.  You 
  343. can use the arrow keys to adjust the object's position in |c71|c3 pixel 
  344. increments.  Again, use the |c7return key|c3 to exit 
  345. the |c7ADD OBJECT|c3 screen.|r1
  346.  
  347. If at any time you make a mistake and wish to delete one or more of
  348. the previous objects in your character, click on |c7DEL OBJECT|c3 and the
  349. most recently added object will be deleted from your character 
  350. definition.
  351. |e
  352.  
  353. Once you have finished defining your character, you may want to click
  354. on |c7SAVE CHAR|c3 to save out the character definition for later re-use.
  355. While this is not required, you may decide to re-do your object
  356. movements, or re-use the character over different backgrounds at a later
  357. date.  After defining your character you can go right over to the
  358. |c7"Generate A Moving Object"|c3 section and do the |c7MOVE|c3 just as 
  359. you would with a non-moving object.
  360. |e
  361.  
  362. While defining your character, you can select as many object images as 
  363. you like.  If you need to get an object from another |c7IFF|c3 file, 
  364. click on 
  365. the |c7Object File|c3 gadget and select the file you need.  You can use as 
  366. many object files as you like though you must keep in mind that all 
  367. the image files you are using must fit in |c7CHIP RAM|c3 while running in 
  368. order for the animation to operate without out-of-memory errors.  
  369. A move normally uses |c73|c3 buffers that are the resolution of the 
  370. background image, |c7NOT|c3 including any of the object 
  371. buffers.  |c72|c3 of these are used for double 
  372. buffering, and the third holds an unmodified copy of the background.  
  373. |e
  374.  
  375. The unmodified background's buffer can easily be placed in |c7FAST|c3 memory 
  376. if you have any, which frees up a little more |c7CHIP RAM|c3 at the expense 
  377. of a slight amount of speed.  You can do this simply by changing the
  378. first |c7LOAD|c3 command in the generated script to a |c7LOADFAST|c3 
  379. command and see how it operates.|r1
  380.  
  381. You could also decide to move some of the object files into 
  382. |c7FAST RAM|c3|-,
  383. though speed would be further impacted, and it will require an extra
  384. |c7COPY|c3 command and some buffer management adjustments to the script.
  385. This is not really recommended, and left as an exercise for the fanatic.
  386. |e
  387.  
  388. |c7|f2Conclusion|c3|f1|r1
  389.  
  390. Included in the |c7"pictures"|c3 directory on this disk are a couple of 
  391. sample
  392. images designed for experimenting with the character building and object
  393. moving capabilities of |c7EBU|c3|-.  The files |c7char1|c3 and 
  394. |c7char2|c3 contain an |c78|c3
  395. frame running |c7"character"|c3|-.  In order to register the character frames
  396. with themselves, cut out the character frames including the |c7ground|c3
  397. lines, register the head positions in order to get the character
  398. lined up left-to-right, but then move the new character image vertically
  399. until the ground lines are level with each other before exiting each
  400. |c7ADD OBJECT|c3 operation.  
  401. |e
  402.  
  403.  
  404.  
  405. After the 
  406. character is built and used in a movement script, you can then
  407. decide to go back into the character images with a paint program
  408. and remove the ground lines if you desire, causing them to disappear
  409. from the final animation.  An overscan background image to be used with
  410. this character is in the |c7pictures|c3 directory and 
  411. called |c7bkgndforchar|c3|-.
  412. |e
  413.  
  414. This example is also an opportunity to try out the |c7shift-arrow|c3 method
  415. of moving the position of an object off-screen.  When you are ready to
  416. move the newly defined character over the screen, you can place him as
  417. far to the left as possible, then use the |c7shift|c3 combined with 
  418. the |c7left arrow|c3 key to shove him completely off screen to the 
  419. left for his initial
  420. position.  Similarly use the |c7shift|c3 combined with the 
  421. |c7right arrow|c3 to adjust
  422. his final position.  We've found that a number of frames from 
  423. |c712|c3 to |c714|c3 is
  424. optimal for this character's running across the entire screen.
  425. |e
  426.  
  427. So have fun.  We found that object movements over backgrounds was something
  428. that we were asked about more often than anything else.  While the Director
  429. was not originally specifically designed to do this, it was doable though 
  430. a little complicated to work out, thus this utility.  It is expected 
  431. that future Director's will provide further enhanced capabilities in this 
  432. area. (among other things)|r1
  433.